package OOP.day08.PersonDemo;

public class Student extends Person {
    String className;
    String  studentId;


    public Student() {
    }

    public Student(String name, int age, String adress, String className, String studentId) {
        super(name, age, adress);
        this.className = className;
        this.studentId = studentId;
    }

    //学习
    public void  study(){
        System.out.println("学生"+name+"正在学习");
    }

    @Override
    public void sleep() {
        System.out.println("调用父类的sleep方法---------");
        super.sleep();
        System.out.println("学生"+name+"正在睡觉");
    }
}
